home *** CD-ROM | disk | FTP | other *** search
- This is a simple print utility program that I wrote many moons ago.
-
- The syntax of the command is:
-
- print [-f | -c | -lN | -r | -e | -nN] file [file [ file .....] ]
-
- with no arguments at all the program will print a brief summary
- of its usage.
-
- With only filename arguments, the program by default prints the
- named files using whatever current font, fontsize and number of
- lines per page are set in the printer. Usually this is PICA,
- 10 chars per inch, 66 lines per page. After each file (including
- the last) the program prints a carriage return and a formfeed.
- These defaults can be overridden by using the following options.
- The options always apply to all files on the argument line.
-
- If the program sends a command sequence to the printer, it uses
- the standard ISO commands. This does not cause a problem even if
- you specify, for example, both '-e' and '-r' as the driver will
- accept both standard and raw commands.
-
- -f means that the program should NOT print the carriage return and
- formfeed at the end of each file ... useful when printing multiple
- copies of files that have been formatted and are already an exact
- number of pages long or already contain a formfeed at the end of
- the file.
-
- -c causes the program to transmit the following command sequences to
- the printer and then terminate without printing anything further:
- reset (clear), set left margin to 1, set right margin to 80,
- set font to PICA, 10 chars per inch, 66 lines per page.
- -c exits and does not print any files.
-
- -l sets the number of lines per page to N. If this is not specified
- then a line spacing command is not sent to the printer and
- therefore the printer default will be used. This is usually
- 66 lines per page. If -e (elite) is specified without -lN then
- 88 lines per page is used. -lN is used to override the default and
- does not usually have to be specified. -lN can be used to print
- a preformatted file containing labels with a formfeed between each
- label.
-
- -r causes 'print' to write the files using raw I/O which
- means that all characters go through exactly as in the file.
- This allows you to put machine-specific control codes in the
- file.
- If -r is not specified then the normal device is used and any
- escape sequences are assumed to be the standard ISO ones used
- by the driver (see include/devices/printer.h for a list of codes)
-
- -e use the elite font (12 cpi AND 88 lines per page) instead of pica.
- The 88 lines per page default can be overidden by the -lN option.
- For the environmentally conscious, this is a good option to use
- when printing program listings since it will save paper by printing
- 88 lines per page instead of 66. WARNING, saving the environment
- may cause you some eyestrain. Life's never easy!
-
- -nN If this option is used then only ONE file should be specified
- and that file will be printed N times.
-
-
- If -e or -lN were specified then after the program has finished
- printing all specified files, it will change the default font back
- to PICA, 10cpi and 66 lines per page.
-
- BUGS: Yep. The ^C abort does not work properly because the program reads
- 512 byte chunks at a time from the file and the printer may have
- a 1K or larger buffer so that the ^C doesn't take effect immediately,
- if at all.
-
-